package ua.kharkov.khpi.tarasenko.bach.web.ui_beans;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

import ua.kharkov.khpi.tarasenko.bach.core.item.ItemBean;

public class RecommendationBean implements Serializable {

	private static final long serialVersionUID = -1333487635995358938L;

	private Set<ItemBean> recs;

	public RecommendationBean() {
		recs = new HashSet<ItemBean>();
	}

	public void addItem(ItemBean ib) {
		recs.add(ib);
	}
	
	public void addAll(Collection<? extends ItemBean> c) {
		recs.addAll(c);
	}
	
	public Set<ItemBean> getRecs() {
		return recs;
	}

	public void setRecs(Set<ItemBean> recs) {
		this.recs = recs;
	}

	public int getSize() {
		return recs.size();
	}

	public void join(RecommendationBean anotherRB) {
		this.recs.addAll(anotherRB.recs);
	}
}
